package com.li.test.model4;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class Model4Listener {
    @RabbitListener(queues = "direct.queue1")
    public void receive5(String msg) {
        System.out.println("消费者1 接收消息:" + msg);
    }
    @RabbitListener(queues = "direct.queue1")
    public void receive6(String msg) {
        System.out.println("消费者2 接收消息:" + msg);
    }
    @RabbitListener(queues = "direct.queue2")
    public void receive7(String msg) {
        System.out.println("消费者3 接收消息:" + msg);
    }
    @RabbitListener(queues = "direct.queue2")
    public void receive8(String msg) {
        System.out.println("消费者4 接收消息:" + msg);
    }
}
